from constant import Constant
from terminalColor import TerminalColor

def wrapWordsAsRed(words):
    return TerminalColor.FAIL + "ERROR: " + words + TerminalColor.ENDC

def printErrorMsg(errorCode):
    error_msg = ''
    if (errorCode == Constant.ERROR_SENTENCETOOLONG['code']):
        error_msg = Constant.ERROR_SENTENCETOOLONG['msg']
    if (errorCode == Constant.ERROR_NOVALIDTRANSLATION['code']):
        error_msg = Constant.ERROR_NOVALIDTRANSLATION['msg']
    if (errorCode == Constant.ERROR_LANGUAGENOTSUPPORTED['code']):
        error_msg = Constant.ERROR_LANGUAGENOTSUPPORTED['msg']
    if (errorCode == Constant.ERROR_INVALIDKEY['code']):
        error_msg = Constant.ERROR_INVALIDKEY['msg']

    error_msg = wrapWordsAsRed(error_msg)
    print error_msg
